﻿<div class="container-fluid scm">
	<div class="row">
		<div class="col-xs-12 col-sm-12 col-md-12 scm-cst-title">
			<ol class="breadcrumb">
				<li class="first-lg">@this.Model.Customer2.Area.AreaName</li>
				<li>@this.Model.Customer2.CustomName</li>
			</ol>
		</div>
	</div>
	<div class="row placeholders">
		<div class="col-xs-12 col-sm-12 col-md-12 scm-cst-tfs-info">
			@this.Model.Customer2.TfsUrl &nbsp;&nbsp;@this.Model.Customer2.ProjectCollectionBasePath
		</div>
	</div>
	<div class="row">
		<div class="col-xs-12 col-sm-12 col-md-12" id="scm-info">
			<ul class="nav nav-tabs" role="tablist">
				@{
					int i = 0;
					foreach (var proj2 in this.Model.Projects2)
					{
						<li role="presentation"
							@if (i == 0) { @: class="active"
																																																																				}><a href="#tab-@proj2.ProjectGUID" aria-controls="tab-@proj2.ProjectGUID" role="tab" data-toggle="tab">@proj2.ProjectName</a></li>
i++;
					}
				}
				<li class="hidden-xs" role="presentation"><a href="/Scm/@ViewBag.SelectedCustomerCode/Init" title="新工作区初始化"><i class="fa fa-plus"></i></a></li>
				<li role="presentation"><a href="/Scm/@ViewBag.SelectedCustomerCode/Authorize" title="项目集合授权"><i class="fa fa-users"></i></a></li>
			</ul>
			<!-- Tab panes -->
			<div class="tab-content">
				@{
					i = 0;
					foreach (var proj2 in this.Model.Projects2)
					{
						<div role="tabpanel" class="tab-pane fade
							 @if (i == 0) { @: in
							 							 						 						 						 						 						 						 						 } active" id="tab-@proj2.ProjectGUID">
							<div class="container-fluid">
								<div class="row">
									<div class="col-xs-12 col-sm-12 col-md-12 scm-panels">
										<div class="row scm-panel" project="@proj2.ProjectName" projectid="@proj2.ProjectGUID">
											<div class="col-xs-12 col-sm-12 col-md-12 proj-info">
												<h4 class="scm-heading">研发环境  &nbsp; <a href="/Scm/@ViewBag.SelectedCustomerCode/Update/@proj2.ProjectGUID" title="调整项目配置信息"><i class="fa fa-cogs"></i></a></h4>
												<div class="container-fluid">
													<div class="row proj-info-panel">
														<div class="proj-info-left">
															Dev-TFS: @proj2.DevTfsProjectPath
														</div>
														<div class="proj-info-middle">
														</div>
														<div class="proj-info-right clearfix">
															Test-Web: @proj2.TestWebFullName
														</div>
													</div>
												</div>
											</div>
											<div class="col-xs-12 col-sm-12 col-md-12 proj-info placeholders">
												<div class="container-fluid">
													<div class="row proj-info-panel">
														<div class="proj-info-left">
															Dev-DB: @proj2.DevDBFullName
														</div>
														<div class="proj-info-middle">
														</div>
														<div class="proj-info-right clearfix">
															Test-DB: @proj2.TestDBFullName
														</div>
													</div>
												</div>
											</div>
											@{
						foreach (var branch in proj2.Branches)
						{
							if (branch.BranchNum == 0)
							{
								<div class="col-xs-12 col-sm-12 col-md-12">
									<div class="container-fluid">
										<div class="row scm-branch" project="@proj2.ProjectName" projectid="@proj2.ProjectGUID" branch="@branch.BranchName" branchid="@branch.BranchGUID">
											<div class="scm-branch-heading trunck">
												主
											</div>
											<div class="scm-branch-dev scm-branch-trunck">
												<span class="branch-icon"><a href="/Scm/@ViewBag.SelectedCustomerCode/Version/@branch.BranchGUID" title="查看主干版本树"><i class="fa fa-hdd-o"></i></a></span>
												<span class="branch-info pull-left hidden-xs">主干</span>
											</div>
											<div class="scm-branch-push text-center">
											</div>
											<div class="scm-branch-test scm-branch-trunck clearfix">
												<span class="branch-icon first-lg hidden-xs"><a href="@string.Format("http://{0}:{1}", proj2.WebServer.IpAddress, branch.WebPort)" target="_blank"><i class="fa fa-link"></i> TestWeb:@branch.WebPort</a></span>
												<span class="branch-icon first-lg visible-xs"><a href="@string.Format("http://{0}:{1}", proj2.WebServer.IpAddress, branch.WebPort)" target="_blank"><i class="fa fa-link"></i> @branch.WebPort</a></span>
												<span class="pull-right"><a href="javascript:void(0)" title="查看注册表信息" onclick="m.scm.branch.openShowSiteConfigs(this);"><i class="fa fa-file-text-o"></i></a></span>
											</div>
											<a href="/Scm/@ViewBag.SelectedCustomerCode/NewBranch/@proj2.ProjectGUID" class="fa-close-linkbtn" aria-label="Close" title="从主干新建分支"><span aria-hidden="true" class="fa fa-plus"></span></a>
										</div>
									</div>
								</div>
							}
							else
							{
								<div class="col-xs-12 col-sm-12 col-md-12">
									<div class="container-fluid">
										<div class="row scm-branch" project="@proj2.ProjectName" projectid="@proj2.ProjectGUID" branch="@branch.BranchName" branchid="@branch.BranchGUID">
											<div class="scm-branch-heading">
												@string.Format("B{0}", branch.BranchNum)
											</div>
											<div class="scm-branch-dev
												 @if (branch.IsUsing) { @: scm-branch-inuse
												 												 												 												 											 											 											 										}
												 ">
										<span class=" branch-icon">
												<a href="/Scm/@ViewBag.SelectedCustomerCode/Version/@branch.BranchGUID" title="查看分支版本树"><i class="fa fa-code-fork"></i></a>
												</span>
												@if (branch.IsUsing)
												{
													<span class="branch-info pull-left hidden-xs"><a href="javascript:void(0)" target="_blank" title="查看任务详情">eg.:20150628-1023</a></span>
													<span class="branch-info pull-left visible-xs"><a href="javascript:void(0)" onclick="m.scm.branch.blockViewTaskOnMobile('20150628-1023')"><i class="fa fa-external-link-square"></i></a></span>
												}
												else
												{
													<span class="branch-info pull-left hidden-xs">空闲中</span>
												}
												<span class="pull-right"><a href="/Scm/@ViewBag.SelectedCustomerCode/Authorize/@branch.BranchGUID" title="分支授权"><i class="fa fa-users"></i></a></span>
												<span class="pull-right"><a href="javascript:void(0)" title="分支信息" onclick="m.scm.branch.openShowDevBranchInfo(this);"><i class="fa fa-info"></i></a></span>
											</div>
											<div class="scm-branch-push text-center">
												@*<img class="img-responsive hidden-xs" src="~/Content/images/scm-push.gif" />
													<img class="img-responsive visible-xs" src="~/Content/images/scm-push-s.gif" />*@
											</div>
											<div class="scm-branch-test
												 @if (branch.IsUsing) { @: scm-branch-inuse
												 												 												 												 											 											 											 											 										}
												 clearfix">
												<span class="branch-icon first-lg hidden-xs"><a href="@string.Format("http://{0}:{1}", proj2.WebServer.IpAddress, branch.WebPort)" target="_blank"><i class="fa fa-link"></i> TestWeb:@branch.WebPort</a></span>
												<span class="branch-icon first-lg visible-xs"><a href="@string.Format("http://{0}:{1}", proj2.WebServer.IpAddress, branch.WebPort)" target="_blank"><i class="fa fa-link"></i> @branch.WebPort</a></span>
												<span class="pull-right"><a href="javascript:void(0)" title="查看注册表信息" onclick="m.scm.branch.openShowSiteConfigs(this);"><i class="fa fa-file-text-o"></i></a></span>
												<span class="pull-right"><a href="javascript:void(0)" title="分支信息" onclick="m.scm.branch.openShowTestBranchInfo(this);"><i class=" fa fa-info"></i></a></span>
											</div>
											<a href="/Scm/@ViewBag.SelectedCustomerCode/DeleteBranch/@branch.BranchGUID" class="fa-close-linkbtn" aria-label="Close" title="删除分支"><span aria-hidden="true" class="fa fa-close"></span></a>
										</div>
									</div>
								</div>
							}
						}
											}
										</div>
									</div>
								</div>
							</div>
						</div>
						i++;
					}
				}
			</div>
		</div>
	</div>
</div>

	@section scripts{
		<script type="text/javascript">
		</script>
	}
